package top.lyc829.zzl_android.ui.travel.edit_travel;

import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProvider;

import android.graphics.Color;
import android.os.Bundle;
import android.text.Editable;
import android.text.Html;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.bumptech.glide.Glide;
import com.luck.picture.lib.PictureSelector;
import com.luck.picture.lib.config.PictureConfig;
import com.luck.picture.lib.config.PictureMimeType;
import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.listener.OnResultCallbackListener;
import com.xuexiang.xpage.base.XPageActivity;
import com.xuexiang.xui.utils.KeyboardUtils;
import com.xuexiang.xui.utils.StatusBarUtils;

import java.util.ArrayList;
import java.util.List;

import top.lyc829.zzl_android.R;
import top.lyc829.zzl_android.logic.bean.ActivityBean;
import top.lyc829.zzl_android.logic.bean.TravelDetailBean;
import top.lyc829.zzl_android.logic.util.AndroidBug5497Workaround;
import top.lyc829.zzl_android.logic.util.GlideEngine;
import top.lyc829.zzl_android.logic.util.RichUtils;
import top.lyc829.zzl_android.logic.util.SoftKeyboardFixerForFullscreen;
import top.lyc829.zzl_android.logic.util.Utils;
import top.lyc829.zzl_android.ui.custom_view.RichEditor;
import top.lyc829.zzl_android.ui.team.add_team.AddTeamActivity;

public class EditTravelActivity extends XPageActivity {

    private EditTravelViewModel mViewModel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //AndroidBug5497Workaround.assistActivity(this);
        SoftKeyboardFixerForFullscreen.assistActivity(this);

        mViewModel = new ViewModelProvider(this).get(EditTravelViewModel.class);
        int teamId = getIntent().getIntExtra("team_id", -1);
        mViewModel.getTeamIdLiveData().setValue(teamId);
        List<ActivityBean> activities = (List<ActivityBean>) getIntent().getSerializableExtra("activities");
        mViewModel.getActivitiesLiveData().setValue(activities);

        TravelDetailBean travelDetail = (TravelDetailBean) getIntent().getSerializableExtra("travel_detail");
        Bundle bundle = new Bundle();
        bundle.putSerializable("travel_detail", travelDetail);
        openPage("EditTravelFragment", bundle);

    }



}